﻿using System;

namespace XKPlatform.Common
{
    public class DateTimeHelper
    {        
        /// <summary> 
        /// 获取时间戳 
        /// </summary>  
        public static long GetTimeStamp(DateTime dateTime)
        {
            TimeSpan ts = dateTime.ToUniversalTime() - new DateTime(1970, 1, 1);
            return Convert.ToInt64(ts.TotalSeconds);
        }
    }
}
